//
//  MyView.m
//  Ideal Text Color
//
//  Created by Myztik Jenz on 5/9/07.
//  Copyright 2007 NTFO Design. All rights reserved.
//

#import "MyView.h"


@implementation MyView

- (id)initWithFrame:(NSRect)frame 
{
    if( self = [super initWithFrame:frame] ) 
	{
		theCurrentColor = [[NSColor whiteColor] retain];
    }
	
    return self;
}

- (void)drawRect:(NSRect)rect 
{
	NSRect bounds = [self bounds];
	[theCurrentColor set];
	[NSBezierPath fillRect:bounds];
}

-(void) setBGColor:(NSColor *)color
{
	[color retain];
	
	if( theCurrentColor != nil )
		[theCurrentColor release];
		
	theCurrentColor = color;
	
	[self setNeedsDisplay:YES];
}

@end
